<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!doctype html>
<html class="no-js">
<head>
    <%@ include file="./common/meta.jsp" %>
    <link rel="stylesheet" href="../css/index.css">
    <link rel="stylesheet" href="../lib/fakeLoader/fakeLoader.css">
    <link rel="stylesheet" href="../lib/animate/animate.min.css">
</head>
<body>
<div id="fakeLoader"></div>
<div id="loading-box">
    <div class="top-h"></div>
    <div class="wp">
        <div class="wp-inner">
            <img class="logo-img" src="../img/logo.png"/>
            <h1 class="logo-name">龙形凤像</h1>
            <button type="button" style="display: none;" class="am-btn am-btn-primary into-app" id="into-app">进入
            </button>
            <p class="logo-txt">帮您开启美丽发现之旅</p>
        </div>
    </div>
</div>
<script src="../lib/fakeLoader/fakeLoader.js"></script>
<script>
    var show = localStorage.getItem("show");
    if (show != null) {
        $("#loading-box").remove();
        $("#main-box").attr("style", null);
        window.location.href = './index.jsp';

    } else {
        localStorage.setItem("show", "show");
        $("#fakeLoader").fakeLoader({
            timeToHide: 1200, //加载效果的持续时间
            zIndex: "999",//
            spinner: "spinner4",//可选值 'spinner1', 'spinner2', 'spinner3', 'spinner4', 'spinner5', 'spinner6', 'spinner7' 对应有7种效果
            bgColor: "#f40" //加载时的背景颜色
        });
        $(function () {

            setTimeout(function () {
                $('.logo-img').addClass('animated fadeInLeft');
            }, 1200);
            setTimeout(function () {
                $('.logo-name').show().addClass('animated zoomIn');
            }, 1800);
            setTimeout(function () {
                $('.logo-txt').show().addClass('animated fadeInUp');
            }, 2400);
            setTimeout(function () {
                $('.into-app').show().addClass('animated fadeInDown');
            }, 2800);


            $('#into-app').on('click', function () {
                $('#loading-box').addClass('animated fadeOutUp');
                setTimeout(function () {
                    $('#loading-box').hide();
                    $('#main-box').show().addClass('main-box');
                }, 500);

                var user = JSON.parse(localStorage.getItem("user"));
                if (user == null || user == "null") {
                    window.location.href = './login/login.jsp';
                } else {
                    window.location.href = './index.jsp';
                }

            });
        })
    }
</script>

</body>
</html>